package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the supplier database table.
 * 
 */
@Entity
@NamedQuery(name="Supplier.findAll", query="SELECT s FROM Supplier s")
public class Supplier implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int supno;

	private String remark;

	private String supname;

	//bi-directional many-to-one association to Depotgood
	@OneToMany(mappedBy="supplierBean")
	private List<Depotgood> depotgoods;

	//bi-directional many-to-one association to Scheduleform
	@OneToMany(mappedBy="supplier")
	private List<Scheduleform> scheduleforms;

	//bi-directional many-to-one association to Supplierman
	@OneToMany(mappedBy="supplier")
	private List<Supplierman> suppliermans;

	public Supplier() {
	}

	public int getSupno() {
		return this.supno;
	}

	public void setSupno(int supno) {
		this.supno = supno;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getSupname() {
		return this.supname;
	}

	public void setSupname(String supname) {
		this.supname = supname;
	}

	public List<Depotgood> getDepotgoods() {
		return this.depotgoods;
	}

	public void setDepotgoods(List<Depotgood> depotgoods) {
		this.depotgoods = depotgoods;
	}

	public Depotgood addDepotgood(Depotgood depotgood) {
		getDepotgoods().add(depotgood);
		depotgood.setSupplierBean(this);

		return depotgood;
	}

	public Depotgood removeDepotgood(Depotgood depotgood) {
		getDepotgoods().remove(depotgood);
		depotgood.setSupplierBean(null);

		return depotgood;
	}

	public List<Scheduleform> getScheduleforms() {
		return this.scheduleforms;
	}

	public void setScheduleforms(List<Scheduleform> scheduleforms) {
		this.scheduleforms = scheduleforms;
	}

	public Scheduleform addScheduleform(Scheduleform scheduleform) {
		getScheduleforms().add(scheduleform);
		scheduleform.setSupplier(this);

		return scheduleform;
	}

	public Scheduleform removeScheduleform(Scheduleform scheduleform) {
		getScheduleforms().remove(scheduleform);
		scheduleform.setSupplier(null);

		return scheduleform;
	}

	public List<Supplierman> getSuppliermans() {
		return this.suppliermans;
	}

	public void setSuppliermans(List<Supplierman> suppliermans) {
		this.suppliermans = suppliermans;
	}

	public Supplierman addSupplierman(Supplierman supplierman) {
		getSuppliermans().add(supplierman);
		supplierman.setSupplier(this);

		return supplierman;
	}

	public Supplierman removeSupplierman(Supplierman supplierman) {
		getSuppliermans().remove(supplierman);
		supplierman.setSupplier(null);

		return supplierman;
	}

}